a=1; % index of data
diary(".\\Result.txt");
diary on;

% for every file in our folders. highly related to your folder arrangment
% we name those sparrow sound data with '+' mark
% other birds were '-' marked
for folderIndex = 11 : 23

    %for debug
    %print("FolderIndex:" + num2str(folderIndex));

    for wavFileIndex = 1 : 10
        filePathName = ".\\#" + num2str(folderIndex) + "+" + "\\processed\\" + num2str(wavFileIndex) + ".wav";
        if exist(filePathName,"file")
            goodData(a,1:3) = birdFFT(filePathName,a);
            
            a=a+1;
        end
    end
end

%write the result into a xlsx file
writematrix(goodData,"goodResult.xlsx");
diary off;

